#自动保存程序
#每隔若干秒钟模拟键盘按下Ctrl+S
import pyautogui as gui
from threading import Timer
from time import sleep
sleeptime=60
def save():
    global sleeptime
    sleeptime-=1
    timer = Timer(1, save)
    timer.start()
    if sleeptime<=0:
        gui.hotkey('ctrl','shift','esc')
        # gui.hotkey('ctrl','s')
        print('保存成功')
        sleeptime=60
save()